//app.js
App({
  onLaunch: function () {
    var that = this;
    wx.getSystemInfo({
      success: function(res) {
        that.globalData.winW = res.windowWidth;
        that.globalData.winH = res.windowHeight;
      }
    })
  },
  
  globalData:{
    winW:0,
    winH:0
  }
})